﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using StockDAL;

namespace StockWeb
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class StockWebSerivce : System.Web.Services.WebService
    {

        [WebMethod(MessageName = "GETPRODUSESTOC", Description = "<b>Stocul produselor din gestiune.</b>")]
        public DataTable getProduseStoc
         (
           string prod_denumire, 
           string prod_cod,
           short bCant
          ) 
        {
            return StockDAL.StockStaticFunctions.getProduseStoc(prod_denumire, prod_cod, bCant);
        }

        [WebMethod(MessageName = "GETTOPPRODUSE", Description = "<b>Produsele cele mai vandute din gestiune.</b>")]
        public DataTable getTopProduse
        (
          string data
         )
        {
            return StockDAL.StockStaticFunctions.getTopProduse(data, string.Empty, 1);
        }
		
    }
}
